


$projectDir = "D:\BiztroNeuesLogging\LookUp\PostBuildTest\PostBuildTest\"
#$projectDir = $args[0]
#$solutionDir = $args[1]
$currentDir = Split-Path -Path $MyInvocation.MyCommand.Definition -Parent
$crlf = "`r`n" 

#[io.DirectoryInfo]::WriteAllText
#string p1Dir = di.Parent.FullName;
$di = New-Object -typename System.IO.DirectoryInfo -argumentlist $projectDir 

$weffef2e  = (New-Object -typename System.IO.DirectoryInfo -argumentlist $projectDir).Exists
write-host $weffef2e


$weffef2exx  = $di.Exists
write-host $weffef2exx

$outText = "ProjectDir:  " + $projectDir + $crlf + 
		   "CurrentDir:  " + $currentDir + $crlf + 
		   #"SolutionDir: " + $solutionDir + $crlf + 
		   "Parent1:     " + $di.Parent.FullName  + $crlf + 
		   "Parent2:     " + $di.Parent.Parent.FullName  + $crlf + 
		   "Parent3:     " + $di.Parent.Parent.Parent.FullName

		   
write-host $outText
$outText | Out-File file1.txt

<#
function GetSubDirs([string] $subDir, [string] $pattern){
    $subDirs = gci -path "$subDir" -force | where {$_.attributes -e "Directory"}
	$a = New-Object System.Collections.ArrayList
    for ($i = 0; $i -lt $subDirs.Length; $i++) {  
        $fullname = $subDirs[$i].FullName
        $match = $False
		$pattern = "\b" + $exclude + "\b"
        if($fullname -match $pattern){
		    $sink = $a.Add("`"" + $fullname.SubString(3) + "`"")
        }
     }
    $subDirs = $a.ToArray()     
    write-host Found $filesToZip.Length files to zip.
    return $subDirs
}

#>

Read-Host
   
<# 
function GetSubDirs([string] $subDir, [string] $pattern){
    $subDirs = gci -path "$subDir" -force | where {$_.attributes -e "Directory"}
	$a = New-Object System.Collections.ArrayList
    for ($i = 0; $i -lt $subDirs.Length; $i++) {  
        $fullname = $subDirs[$i].FullName
        $match = $False
		$pattern = "\b" + $exclude + "\b"
        if($fullname -match $pattern){
		    $sink = $a.Add("`"" + $fullname.SubString(3) + "`"")
        }
     }
    $subDirs = $a.ToArray()     
    write-host Found $filesToZip.Length files to zip.
    return $subDirs
}

$sd = GetSubDirs($projectDir, "Truck*" )
$sd | Out-File file1.txt
	#>


	
<#		   
$outText | Out-File file1.txt
$subDirs dir | where {$_.PsIsContainer}
#>

<#
$sw = New-Object System.IO.StreamWriter("NeatFile.txt")
$sw.writeline("I could write a lot of neat stuff here!")
$sw.close()
#>
<#
[IO.Directory]::GetCurrentDirectory()
#>

<#
dir | where {$_.PsIsContainer}

Alternatively you could:

dir |where {$_.mode -match "d"}
#>



<#
function dir   { get-childitem $args -ea silentlycontinue | sort @{e={$_.PSIsContainer}; asc=$false},@{e={$_.Name}; asc=$true} } 
function dirw  { get-childitem $args -ea silentlycontinue | sort @{e={$_.PSIsContainer}; asc=$false},@{e={$_.Name}; asc=$true} | format-wide } 
function dirs  { get-childitem $args -ea silentlycontinue | sort Length } 
function dirt  { get-childitem $args -ea silentlycontinue | sort LastWriteTime } 
function dird  { get-childitem $args -ea silentlycontinue | where { $_.PSIsContainer } } 

#>